function Confirm-InsightParameters {
    [CmdletBinding()]
    [OutputType([bool])]
    param ([Parameter(Mandatory = $true)][LSInsightParameters]$LSInsight)

    # Create hashtable of properties.
    $properties = @{
        'Placement' = $LSInsight.Placement
        'Server name' = $LSInsight.Server.Name
        'Server login' = $LSInsight.Server.Credential.UserName
        'Server password' = "$('*'*$($LSInsight.Server.Credential.Password.Length))"
        'Database name' = $LSInsight.Database.Name
        'Azure Data Factory v2 name' = $LSInsight.ADFv2.Name
        'Location' = $LSInsight.Location
    }

    if ($LSInsight.Placement -eq 'In_Azure') {
        $properties.'Database pricing tier' = $LSInsight.Database.PricingTier
    }

    # Display parameters.
    Write-Host # Newline.
    Write-Host "LS Insight parameters:"
    Write-Host "$($properties.GetEnumerator() | Sort-Object -Property 'Name' | Format-Table | Out-String)"

    # Ask user to confirm.
    do {
        $answer = Read-Host -Prompt 'Is this correct? (y/n)'
    } while ($answer -inotin @('y','yes','n','no'))

    # Convert answer to boolean.
    return $answer -iin @('y','yes')
}